package com.xbj.cloud;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author: 观雾
 * @create: 2024-08-20
 * @description:
 **/
@SpringBootApplication
@EnableDiscoveryClient //consul 服务注册与发现
@EnableFeignClients   //启用openFeign客户端,定义服务+绑定接口,以声明使的方法优雅而简单的实现服务调用
public class FeignOrder80 {
    private static final  Logger LOG = LoggerFactory.getLogger(FeignOrder80.class);


    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(FeignOrder80.class);
        String[] activeProfiles = applicationContext.getEnvironment().getActiveProfiles();
        LOG.info("FeignOrder80启动成功");
        for (String profile :activeProfiles) {
            LOG.info("当前使用的profile:"+profile);
        }
    }
}
